2 Problem: 10327 - Flip sort (UVa)
3 Author: Andrés Mejía-Posada
4 (http://blogaritmo.factorcomun.org)
28 #define D(x) cout << #x " is " << x << endl
33 void randomTestCase(){
36 for (int i
=0; i
<n
; ++i
){
37 printf("%s%d", i
? " " : "", random() % (1<<10));
47 for (int n
; scanf("%d", &n
) == 1; ){
48 for (int i
=0; i
<n
; ++i
){
52 for (int i
=0; i
<n
; ++i
){
53 for (int j
=i
+1; j
<n
; ++j
){
57 printf("Minimum exchange operations : %d\n", ans
);